
#Load in some Data
data2=read.csv("columbia_experiment_may11_type2clean.csv", header=TRUE)
data3=read.csv("columbia_experiment_may11_type3clean.csv", header=TRUE)
data4=read.csv("columbia_experiment_may11_type4clean.csv", header=TRUE)
data5=read.csv("columbia_experiment_may11_type5clean.csv", header=TRUE)

data16=read.csv("Columbia_experiment_September27_type16clean.csv", header=TRUE)
data17=read.csv("Columbia_experiment_September27_type17clean.csv", header=TRUE)
data18=read.csv("Columbia_experiment_September27_type18clean.csv", header=TRUE)
data19=read.csv("Columbia_experiment_September27_type19clean.csv", header=TRUE)

dataframe16=data.frame(data16)
dataframe16=subset(dataframe16,uid>1600)
dataframe17=data.frame(data17)
dataframe17=subset(dataframe17,uid>1700)
dataframe18=data.frame(data18)
dataframe18=subset(dataframe18,uid>1800)
dataframe19=data.frame(data19)
dataframe19=subset(dataframe19,uid>1900)

dataframe2=rbind(data.frame(data2),dataframe16)
dataframe3=rbind(data.frame(data3),dataframe17)
dataframe4=rbind(data.frame(data4),dataframe18)
dataframe5=rbind(data.frame(data5),dataframe19)

#Properly assign parameters to different experiment types
dataframe2$version=1
dataframe2$Bcorrinc=55
dataframe2$Bfailinc=40


dataframe3$version=2
dataframe3$Bcorrinc=52
dataframe3$Bfailinc=40


dataframe4$version=3
dataframe4$Bcorrinc=52
dataframe4$Bfailinc=30


dataframe5$version=4
dataframe5$Bcorrinc=55
dataframe5$Bfailinc=30

#Combine data and assign useful dummies
dataframe=rbind(dataframe2,dataframe3,dataframe4,dataframe5)
dataframe$Bresponse=(dataframe$response==19)
dataframe$Bstate=(dataframe$state==4)
dataframe$Cpresent=(dataframe$qtype==4)